package anonymouschat.client.frames;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

import anonymouschat.utils.LocalFileOps;


/**
 * Log Frame shows chat log with a specific user.
 * 
 * @author hb
 * 
 */
public class LogFrame extends JFrame{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private static final int WIDTH = 300;
	private static final int HEIGHT = 500;
	private JTextArea msgArea;
	private JScrollPane msgScr;
	
	public LogFrame(String userID) {
		super();
		this.msgArea = new JTextArea();
		this.msgArea.setText(LocalFileOps.getChatLog(userID));
		this.msgArea.setEditable(false);
		this.msgScr = new JScrollPane(msgArea);
		this.add(msgScr);
		this.setSize(WIDTH, HEIGHT);
		this.setVisible(true);
	}

}
